home *** CD-ROM | disk | FTP | other *** search
- Fix For Dream004 REQUIRED!!! (Left out a function)
- ``Unca Scrooge`` WWIVnet #188 AT 2077
- Wed Mar 10 12:36:13 1993
- ┌────────────────────────────────────────────────────────────────────────────┐
- │ Mod Name: Dream04A.mod Date: 03/07/93 │
- │ Difficulty: █▒▒▒▒▒▒▒▒▒▒ Mod Authors: Unca Scrooge │
- │ WWIV Version: 4.22 1@3759 WWIVnet │
- │ Files Affected: Xfer.C │
- │ Description: New FileList (Looks Good!) │
- │ │
- └────────────────────────────────────────────────────────────────────────────┘
-
- Addition : DUH!!!! I used Tolkien's Enhance.C in this and forgot
- to include the function. JEEZ! Thanx to all that pointed it out
- me!!! Nothing has changed, and the function is added at the
- end. Sorry about that!!! And HOPEFULLY I didn't miss anymore
- functions!!! (Gad!)
-
-
- Long Descr : I've been looking for a mod like this for a LOOOONG time!!!
- Couldn't find one anywhere, so I finally did one... welp, it
- puts a box around the FileName and FileSize, adds new dir header
- and a Palm Tree (optional, I like 'em) :) I use Extended
- Colors... (b-p).. if you don't have these.. I commented where
- they are... just change 'em! (Hopefully I commented them
- all, if not you'll know! 8^] (YOu really SHOULD add them, tho
- I can't remember the name of the mod or who wrote the one I
- added.... (Sorry whoever!!) (I think it was HJxxxx.mod ??)
-
- Disclamimer: I wrote it, but YOU put it in! Works here at DreamNET. If ya
- need help lemme know!
-
- Da Mod :
-
-
- Step 1 : Load up Xfer.C and search for...
- void print_extended(.... and replace it with this one...
-
-
- void print_extended(char *fn, int *abort, unsigned char numlist, int indent)
- {
- char *ss;
- int next=0;
- unsigned char numl=0;
- int cpos=0;
- char ch,s[81];
- int i;
-
- ss=read_extended_description(fn);
- if (ss) {
- ch=10;
- while ((ss[cpos]) && (!(*abort)) && (numl<numlist)) {
- if ((ch==10) && (indent)) {
- if (okansi())
- sprintf(s,"3║%s3║1 3║5",charstr(12,' '));
- else {
- for (i=0; i<INDENTION; i++)
- s[i]=32;
- s[INDENTION]=0;
- }
- osan(s,abort,&next);
- if ((thisuser.sysstatus & sysstatus_funky_colors) && (!(*abort)))
- ansic(2);
- }
- outchr(ch=ss[cpos++]);
- checka(abort,&next);
- if (ch==10)
- ++numl;
- else
- if ((ch!=13) && (wherex()>=78)) {
- osan("\r\n",abort,&next);
- ch=10;
- }
- }
- if (wherex())
- nl();
- }
- farfree(ss);
- }
-
- Step 2 : Replace void printinfo(.... with this one.
-
-
- void printinfo(uploadsrec *u, int *abort)
- {
- char s[85],s1[40],s2[81];
- int i,i1,i2,next,fc;
-
- fc=thisuser.sysstatus & sysstatus_funky_colors;
-
- if (fc)
- ansic(1);
- osan("3║1",abort,&next);
- strncpy(s,u->filename,8);
- s[8]=0;
- osan(s,abort,&next);
- strncpy(s,&((u->filename)[8]),4);
- s[4]=0;
- if (fc)
- ansic(2);
- osan(s,abort,&next);
- if (fc)
- ansic(0);
- osan("3║ 1",abort,&next);
- ltoa((((u->numbytes)+1023)/1024),s1,10);
- ansic(7);
- strcat(s1,"k");
-
- #ifdef CHECK_FOR_EXISTANCE
- strcpy(s2,directories[udir[curdir].subnum].path);
- strcat(s2,u->filename);
- if (!exist(s2))
- strcpy(s1,get_string(741));
- #endif
-
- for (i=0; i<5-strlen(s1); i++)
- s[i]=32;
- s[i]=0;
- strcat(s,s1);
- if (fc)
- ansic(3);
- osan(s,abort,&next);
-
- if (fc)
- ansic(0);
- osan("3 ║1",abort,&next);
- if (fc)
- ansic(5);
- pla(u->description,abort);
- if ((!*abort) && (thisuser.num_extended) && (u->mask & mask_extended))
- print_extended(u->filename,abort,thisuser.num_extended,1);
- if (!(*abort))
- ++num_listed;
- }
-
- Step 3 : Replace void printtitle(... with this
-
-
- void printtitle(int *abort)
- {
- char s[81],s1[20];
- int i,i1;
-
- /* pl("5 ▀■▄■▀"); ***** Uncomment this if you want the Palm Trees
- pl("5 ■▀g█5▀■"); Heart-G is Brown *****
- pl("7▄█▄█▄g█ 7DreamNET"); */
- sprintf(s,"b%s - p#7%sp, 7%d b%s.",directories[udir[curdir].subnum].name,
- udir[curdir].keys,numf, get_string(742));
-
- /**** Above.. Heart-b is Dark Blue, Heart-p is White ****/
-
- i=strlen(s);
- if (thisuser.sysstatus & sysstatus_funky_colors)
- ansic(3);
- pla(s,abort);
- for (i1=0; i1<i; i1++)
- s[i1]='═';
- s[i]=0;
- if (thisuser.sysstatus & sysstatus_funky_colors)
- ansic(3);
- pla(s,abort);
- pla("",abort);
- }
-
-
- Step 4 : Replace void listfiles(... with this.
-
- void listfiles(void)
- {
- char s[81];
- int i,abort,next=0;
- uploadsrec u;
-
- dliscan();
- file_mask(s);
- abort=0;
- num_listed=0;
- printtitle(&abort);
- pl("7 FileName Size Description");
- pl("3╔════════════╦═══════╗");
- for (i=1; (i<=numf) && (!abort) && (!hangup); i++) {
- SETREC(i);
- read(dlf,(void *)&u,sizeof(uploadsrec));
- if (compare(s,u.filename))
- printinfo(&u,&abort);
- else if (!empty())
- checka(&abort,&next);
- }
- closedl();
- pl("3╚════════════╩═══════╝");
- if (!abort) {
- pl("5 ▀■▄■▀"); **** Uncomment this if you want the Palm Tree
- pl("5 ■▀g█5▀■"); Heart-g is Brown ****
- pl("7▄█▄█▄g█"); */
- sprintf(s,"7≡b≡≡m%sp: m%db≡≡7≡",get_string(744), num_listed);
- /* Above... Heart-b is Dark Blue, Heart-m is Dark Red,
- Heart-p is White */
- pl(s);
- }
- }
-
- That's it!
-
-
- Below is what is looks like......
-
- 5 ▀■▄■▀
- 5 ■▀g█5▀■
- 7▄█▄█▄g█ 7DreamNET
- bMiscellaneous FREE DOWNLOADS! - p#b1p, b11 files.
- b════════════════════════════════════════════════════════════════════
-
- 7 FileName Size Description
- 3╔════════════╦═══════╗
- 3║1AD .ANS3║7 3k 3║1ANSI AD for DreamNET Grab it and pass it around
- 3║1AD .ASC3║7 2k 3║1ASCII AD for DreamNET Grab it and pass it around
- 3║1ADULT .TXT3║7 5k 3║1Adult Access registration form
- 3║1ALLFILES.TXT3║7 19k 3║1LIST OF ALL FILES AVAILABLE FOR DL ON DREAMNET !
- 3║1BBS0112 .ZIP3║7 13k 3║1Indy BBS List as of 1/12/93
- 3║1BBSPEAK .TXT3║7 2k 3║1Explanation of BBS symbols ( :), TTFN, etc..)
- 3║1CONTEST .ARJ3║7 3k 3║1Vote for the BEST BBS in the country.
- 3║1DISK-ORD.FRM3║7 3k 3║1Order any program available on DreamNET by mail!
- 3║1DONATE .REG3║7 2k 3║1Private Membership registration form
- 3║1TW-DOX .ZIP3║7 26k 3║1TW 2002 Dox
- 3║1USER .ZIP3║7 28k 3║1WWIV 4.22 User Dox....
- 3╚════════════╩═══════╝
- 5 ▀■▄■▀
- 5 ■▀g█5▀■
- 7▄█▄█▄g█
- 7≡b≡≡mFiles listedp: m11b≡≡7≡
-
- From Tolkien's Enhance.C (Great additions!!!!) I recommend installing it!
-
- Put this somewhere (end of Xfer.C !?) and add
-
- unsigned char *charstr(int len, int repeatchar) to FCNS.H or MAKE FCNS.
-
-
- /*═════════════════════════════════════════════════════════════════════════*/
-
- /*
- * This function is used to create long strings composed of an identical
- * character, for boxes or underlining or whatever. Saves repetitive and
- * time-consuming loops. The string returned will be len characters long,
- * each character being a repeatchar character.
- *
- *
- unsigned char *charstr(int len, int repeatchar)
- {
- static char s[81],c;
- int i;
-
- if (len>80)
- len=80;
- if (len<0)
- len=0;
-
- if ((repeatchar==0) || (len==0))
- return("");
-
- c=repeatchar;
- for (i=0;i<len;i++)
- s[i]=c;
- s[len]=0;
- return(s);
- }
- *
- * Example(s):
- *
- * The following line would be very DGROUP wasteful:
- *
- * pl("--------------------------------------------------------------");
- *
- * The next line would be far more efficient and easier to type, while looking
- * exactly the same:
- *
- * pl(charstr(62,'-'));
- *
- */
-
- /*═════════════════════════════════════════════════════════════════════════*/
-
-
- Oh Yeah : The block head and foot (╔════════════╦═══════╗, etc.) won't
- be on it when you do an //UPLOAD or a Scan/Search... working
- on those now... will release a revision as soon as it's
- finished.... but as it is now, it's nice!
-
- Lemme know if you use this! I'd like to know...
-
-